/*
 * Node.cpp
 *
 *  Created on: 13.10.2010
 *      Author: jilly
 */

#include <iostream>
#include "Node.h"

using namespace std;

Node::Node() {}

/**
 * copy constructor
 * may be useful in future
 */
Node::Node(Node* other)
{
	parent = other->parent;
	moves = other->moves;
	move = other->move;
	state = other->state;
}

Node::~Node()
{
	delete move;
}

/**
 * clones this node
 */
Node* Node::clone()
{
	return new Node(this);
}
Node* Node::getParent()
{
	return parent;
}

void Node::setParent(Node * parent)
{
	this->parent = parent;
}
unsigned int Node::getMoves()
{
	return this->moves;
}

void Node::setMoves(unsigned int moves)
{
	this->moves = moves;
}

Move* Node::getMove() const
{
	return move;
}

void Node::setMove(Move *move)
{
	this->move = move;
}

unsigned short Node::getState()
{
	return state;
}

void Node::setState(unsigned short state)
{
	this->state = state;
}

unsigned int Node::getMovesWithoutHit() const
{
	return movesWithoutHit;
}

void Node::setMovesWithoutHit(unsigned int movesWithoutHit)
{
	this->movesWithoutHit = movesWithoutHit;
}
